package com.sls.web.manager.action.game;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.sls.core.common.CommonUtil;
import com.sls.web.manager.action.SuperAction;
import com.sls.web.manager.common.Constants;
import com.sls.web.manager.common.DataUtil;
import com.sls.web.manager.common.DateUtil;
import com.sls.web.manager.common.FilterStringSpaces;
import com.sls.web.manager.execption.ManagerException;
import com.sls.web.manager.game.pojo.DownstreamUserInfo;
import com.sls.web.manager.game.pojo.OrderInfo;
import com.sls.web.manager.game.querybean.OrderInfoQuery;
import com.sls.web.manager.game.service.DownstreamUserService;
import com.sls.web.manager.game.service.OrderInfoService;
import com.sls.web.manager.page.Pagination;

/**
 * 订单管理
 * 
 * @author gesx
 * 
 */
@Results(value = { @Result(name = "filedownload", type = "stream", params = {
		"contentType", "application/x-download", "inputName", "istream",
		"contentDisposition", "attachment;filename=${fileName}" }) })
public class OrderInfoAction extends SuperAction {

	private static final long serialVersionUID = 9067832668004025093L;
	@Resource(name = "orderInfoService")
	private OrderInfoService orderInfoService;
	@Resource(name = "downstreamUserService")
	private DownstreamUserService downUserService;
	private OrderInfoQuery orderInfoQuery;
	private Pagination<OrderInfo> page;
	private String orderId;
	private String merchantOrderId;
	private String gameAccount2;
	private String contractId;
	private String paymentOrderNo;
	private String merchantIP;
	private String totalPrice;
	private OrderInfo orderInfo;
	private String status;
	private String ordId;
	private String supplierName;
	private String isPay;
	private String createOrderTimeStart;
	private String createOrderTimeEnd;
	private List<String> supplyNameList;
	private List<DownstreamUserInfo> downUserList;
	private String downUserNo;

	private String fileName;// 文件名称
	private InputStream istream; // 输入流

	private String registerAccount;
	private List<OrderInfo> accountList;
	private String registerAccountName;

	/**
	 * 列表显示
	 * 
	 * @return
	 * @throws Exception
	 */
	public String list() throws Exception {
		if (orderInfoQuery == null) {
			orderInfoQuery = new OrderInfoQuery();
			orderInfoQuery.setPageSize(Constants.INIT_PAGESIZE);
			orderInfoQuery.setCurrentPage(Constants.INIT_CURRENTPAGE);
		}

		try {
			orderInfoQuery.setIsDelete("1");
			String startTime = orderInfoQuery.getCreateOrderTimeStart();
			String endTime = orderInfoQuery.getCreateOrderTimeEnd();
			if (StringUtils.isBlank(startTime)) {
				startTime = DateUtil.getTodayBegin();
				orderInfoQuery.setCreateOrderTimeStart(startTime);
			}
			if (StringUtils.isBlank(endTime)) {
				endTime = DateUtil.getTodayEnd();
				orderInfoQuery.setCreateOrderTimeEnd(endTime);
			}
			page = orderInfoService.queryList(orderInfoQuery,
					getCurrentOperator());
			supplyNameList = this.orderInfoService
					.querySupplyNameList(getCurrentOperator());
			downUserList = this.downUserService
					.queryAllDownUserInfo(getCurrentOperator());
			accountList = orderInfoService.queryAllAccountNo(orderInfoQuery,
					getCurrentOperator());

		} catch (ManagerException e) {
			addActionError(e.getMessage());
		}
		return LIST;
	}

	/**
	 * 搜索后显示的列表
	 * 
	 * @return
	 * @throws Exception
	 */
	public String queryList() throws Exception {
		if (orderInfoQuery == null) {
			orderInfoQuery = new OrderInfoQuery();
			orderInfoQuery.setPageSize(Constants.INIT_PAGESIZE);
			orderInfoQuery.setCurrentPage(Constants.INIT_CURRENTPAGE);
		}

		try {
			String orderId = orderInfoQuery.getOrderId();
			String mOrderId = orderInfoQuery.getMerchantOrderId();
			String gameAcc = orderInfoQuery.getGameAccount();
			orderId = FilterStringSpaces.checkStringHasSpace(orderId);
			mOrderId = FilterStringSpaces.checkStringHasSpace(mOrderId);
			gameAcc = FilterStringSpaces.checkStringHasSpace(gameAcc);
			String startTime = orderInfoQuery.getCreateOrderTimeStart();
			String endTime = orderInfoQuery.getCreateOrderTimeEnd();
			if (StringUtils.isBlank(startTime)) {
				startTime = DateUtil.getTodayBegin();
				orderInfoQuery.setCreateOrderTimeStart(startTime);
			}
			if (StringUtils.isBlank(endTime)) {
				endTime = DateUtil.getTodayEnd();
				orderInfoQuery.setCreateOrderTimeEnd(endTime);
			}
			orderInfoQuery.setIsDelete("1");
			orderInfoQuery.setOrderId(orderId);
			orderInfoQuery.setMerchantOrderId(mOrderId);
			orderInfoQuery.setGameAccount(gameAcc);
			if ("-请选择供应商名称-".equals(supplierName) || "".equals(supplierName)) {
				supplierName = null;
			}
			orderInfoQuery.setSupplyName(supplierName);
			if ((registerAccount != null) && !("".equals(registerAccount))) {
				String[] StrArr = registerAccount.split(",");
				registerAccount = StrArr[0];
				registerAccountName = StrArr[1];
				orderInfoQuery.setRegisterAccount(registerAccount);
				orderInfoQuery.setRegisterAccountName(registerAccountName);
			}

			page = orderInfoService.queryList(orderInfoQuery,
					getCurrentOperator());
			supplyNameList = this.orderInfoService
					.querySupplyNameList(getCurrentOperator());
			String suplName = "-请选择供应商名称-";
			supplyNameList.add(suplName);

			downUserList = this.downUserService
					.queryAllDownUserInfo(getCurrentOperator());

			accountList = orderInfoService.queryAllAccountNo(orderInfoQuery,
					getCurrentOperator());
			OrderInfo qingxueze = new OrderInfo();
			qingxueze.setRegisterAccount(null);
			qingxueze.setRegisterAccountName("-请选择工号-");
			
			
			accountList.add(qingxueze);

		} catch (ManagerException e) {
			addActionError(e.getMessage());
		}
		return LIST;
	}

	/**
	 * 详情
	 * 
	 * @return
	 * @throws Exception
	 */
	public String detail() throws Exception {
		try {
			orderInfo = orderInfoService.queryById(orderId,
					getCurrentOperator());
			String areaServer = orderInfo.getAreaServer();
			String area = "";
			String server = "";
			String areaServerStr = "";
			StringBuilder strBui = new StringBuilder();
			String[] areaServerArr = areaServer.split("##");
			if (areaServerArr.length > 0) {
				area = areaServerArr[0];
			}
			if (areaServerArr.length > 1) {
				server = areaServerArr[1];
			}
			if (area != null && !("".equals(area)) && !("null".equals(area))) {
				strBui.append(area);
			}
			if (server != null && !("".equals(server))
					&& !("null".equals(server))) {
				strBui.append(";"); // 区域服务器用逗号分隔
				strBui.append(server);
			}
			areaServerStr = strBui.toString().trim();
			orderInfo.setAreaServer(areaServerStr);
		} catch (ManagerException e) {
			addActionError(e.getMessage());
		}
		return "detail";
	}

	public String toEdit() throws Exception {
		orderInfo = orderInfoService.queryById(orderId, getCurrentOperator());
		if (orderInfo == null) {
			return ERROR;
		}
		return "edit";
	}

	/**
	 * 修改
	 * 
	 * @return
	 * @throws Exception
	 */
	public String edit() throws Exception {
		try {
			boolean result = orderInfoService.update(orderInfo,
					getCurrentOperator());
			if (!result) {
				return ERROR;
			} else {
				if (orderInfoQuery == null) {
					orderInfoQuery = new OrderInfoQuery();
					orderInfoQuery.setPageSize(Constants.INIT_PAGESIZE);
					orderInfoQuery.setCurrentPage(Constants.INIT_CURRENTPAGE);
				}
				if (StringUtils.isNotEmpty(ordId)) {
					orderInfoQuery.setOrderId(ordId);
				}
				if (StringUtils.isNotEmpty(status)) {
					orderInfoQuery.setStatus(status);
				}
				if (StringUtils.isNotEmpty(merchantOrderId)) {
					orderInfoQuery.setMerchantOrderId(merchantOrderId);
				}
				if (StringUtils.isNotEmpty(gameAccount2)) {
					orderInfoQuery.setGameAccount(gameAccount2);
				}
				return list();
			}
		} catch (ManagerException e) {
			flag = false;
			addActionError(e.getMessage());
			redirectionUrl = "order_info!list.htm";
			return SUCCESS;
		}
	}

	/**
	 * 删除
	 * 
	 * @return
	 * @throws Exception
	 */
	public String delete() throws Exception {
		try {
			OrderInfo orderInfo = new OrderInfo();
			orderInfo.setIsDelete("0");
			orderInfo.setOrderId(orderId);
			orderInfo.setStatus(status);
			orderInfoService.update(orderInfo, getCurrentOperator());
			if (orderInfoQuery == null) {
				orderInfoQuery = new OrderInfoQuery();
				orderInfoQuery.setPageSize(Constants.INIT_PAGESIZE);
				orderInfoQuery.setCurrentPage(Constants.INIT_CURRENTPAGE);
			}
			if (StringUtils.isNotEmpty(status)) {
				orderInfoQuery.setStatus(status);
			}
		} catch (ManagerException e) {
			addActionError(e.getMessage());
		}
		return list();
	}

	/**
	 * 退款
	 * 
	 * @return
	 * @throws Exception
	 */
	public String refund() throws Exception {
		OrderInfo order = new OrderInfo();
		order.setOrderId(orderId);
		order.setContractId(contractId);
		order.setPaymentOrderNo(paymentOrderNo);
		order.setMerchantIP(merchantIP);
		int totalP = Integer.parseInt(totalPrice);
		order.setTotalPrice(totalP);
		try {
			String payState = orderInfoService.refund(order,
					getCurrentOperator());
			if (!"3".equals(payState)) {
				flag = false;
				addActionError("退款失败!");
			}
			redirectionUrl = "order_info!list.htm";
		} catch (ManagerException e) {
			flag = false;
			addActionError(e.getMessage());
		}
		return SUCCESS;
	}

	public String queryTotalPrice() throws Exception {
		String errorMsg = "";
		Map<String, Object> resultMap = new HashMap<String, Object>();
		try {
			String[] StrArr = registerAccount.split(",");
			registerAccount = StrArr[0];
			orderInfoQuery.setRegisterAccount(registerAccount);
			orderInfoQuery.setSupplyName(supplierName);
			Long totalPrice = this.orderInfoService.queryOrderTotalPrice(
					orderInfoQuery, getCurrentOperator());
			BigDecimal tp = DataUtil.div(totalPrice, 1000L);
			resultMap.put("totalPrice", tp);
		} catch (ManagerException e) {
			errorMsg = e.getMessage();
		}
		resultMap.put("errorMsg", errorMsg);
		message = CommonUtil.gson().toJson(resultMap);
		return "ajax";
	}

	public String queryCostTotalPrice() throws Exception {
		String errorMsg = "";
		Map<String, Object> resultMap = new HashMap<String, Object>();
		try {
			String[] StrArr = registerAccount.split(",");
			registerAccount = StrArr[0];
			orderInfoQuery.setRegisterAccount(registerAccount);
			orderInfoQuery.setSupplyName(supplierName);
			Long costTotalPrice = this.orderInfoService
					.queryOrderCostTotalPrice(orderInfoQuery,
							getCurrentOperator());
			BigDecimal ctp = DataUtil.div(costTotalPrice, 1000L);
			resultMap.put("costTotalPrice", ctp);
		} catch (ManagerException e) {
			errorMsg = e.getMessage();
		}
		resultMap.put("errorMsg", errorMsg);
		message = CommonUtil.gson().toJson(resultMap);
		return "ajax";

	}

	public String queryCostTotalParvalue() throws Exception {
		String errorMsg = "";
		Map<String, Object> resultMap = new HashMap<String, Object>();
		try {
			String[] StrArr = registerAccount.split(",");
			registerAccount = StrArr[0];
			orderInfoQuery.setRegisterAccount(registerAccount);
			orderInfoQuery.setSupplyName(supplierName);
			Long costTotalParvalue = this.orderInfoService
					.queryOrderTotalParvalue(orderInfoQuery,
							getCurrentOperator());
			BigDecimal ctp = DataUtil.div(costTotalParvalue, 1000L);
			resultMap.put("totalParvalue", ctp);
		} catch (ManagerException e) {
			errorMsg = e.getMessage();
		}
		resultMap.put("errorMsg", errorMsg);
		message = CommonUtil.gson().toJson(resultMap);
		return "ajax";

	}
	
	public String queryTotalNum() throws Exception {
		String errorMsg = "";
		Map<String, Object> resultMap = new HashMap<String, Object>();
		try {
			String[] StrArr = registerAccount.split(",");
			registerAccount = StrArr[0];
			orderInfoQuery.setRegisterAccount(registerAccount);
			orderInfoQuery.setSupplyName(supplierName);
			Long numTotal = this.orderInfoService
					.queryOrderTotalNum(orderInfoQuery, getCurrentOperator());
			resultMap.put("totalNum", numTotal);
		} catch (ManagerException e) {
			errorMsg = e.getMessage();
		}
		resultMap.put("errorMsg", errorMsg);
		message = CommonUtil.gson().toJson(resultMap);
		return "ajax";

	}

	/**
	 * 手工通知异步结果给下游用户
	 * 
	 * @return
	 * @throws Exception
	 */
	public String manualNotify() throws Exception {
		try {
			this.orderInfoService.manualNotify(orderId, getCurrentOperator());
			redirectionUrl = "order_info!list.htm";
		} catch (ManagerException e) {
			flag = false;
			addActionError(e.getMessage());
		}
		return SUCCESS;
	}

	public String toExport() throws Exception {
		supplyNameList = this.orderInfoService
				.querySupplyNameList(getCurrentOperator());
		return "export";
	}

	/**
	 * 导出excel文件
	 * 
	 * @return
	 * @throws Exception
	 */
	public String export() throws Exception {
		List<OrderInfo> list = null;
		try {
			list = this.orderInfoService.queryOrderInfo(supplierName, isPay,
					status, downUserNo, createOrderTimeStart,
					createOrderTimeEnd, getCurrentOperator(), registerAccount);
		} catch (ManagerException e1) {
			addActionError(e1.getMessage());
			flag = false;
			return SUCCESS;
		}
		String dateStr = createOrderTimeStart.substring(0, 10);
		String filename = "订单信息-" + dateStr + ".xls";
		if (StringUtils.isNotBlank(supplierName)) {
			filename = supplierName + "订单信息-" + dateStr + ".xls";
		}
		// URL url = Thread.currentThread().getContextClassLoader()
		// .getResource("");
		// URI uri = new URI(url.toURI().toString() + "download");
		// File dir = new File(uri);
		// if (!dir.exists()) {
		// dir.mkdirs();
		// }
		// String filePath = dir.getAbsolutePath() + File.separator + filename;
		try {
			this.createExcel(filename, list, supplierName);
			// this.downloadfile(filePath, filename);
		} catch (IOException e) {
			addActionError("导出文件异常!");
			flag = false;
			return SUCCESS;
		}
		return "filedownload";
	}

	/**
	 * @param filePath
	 *            文件路径
	 * @param filenameWeb
	 *            返回页面的文件名
	 * @throws Exception
	 */
	// public void downloadfile(String filePath, String filenameWeb)
	// throws Exception {
	// fileName = new String(filenameWeb.getBytes("GBK"), "iso8859-1");
	// File file = new File(filePath);
	// if (!file.exists()) {
	// return;
	// }
	// FileInputStream fis = new FileInputStream(file);
	// ByteArrayOutputStream baos = new ByteArrayOutputStream();
	// byte[] tempbytes = new byte[1024];
	// int byteread = 0;
	// // 读入多个字节到字节数组中，byteread为一次读入的字节数
	// while ((byteread = fis.read(tempbytes)) != -1) {
	// baos.write(tempbytes, 0, byteread);
	// baos.flush();
	// }
	// if (file.exists()) {
	// file.delete();
	// }
	// istream = new ByteArrayInputStream(baos.toByteArray());
	// baos.close();
	// fis.close();
	// }

	/**
	 * 创建excel表格
	 * 
	 * @param path
	 * @param list
	 * @throws IOException
	 */
	public void createExcel(String filenameWeb, List<OrderInfo> list,
			String supplierName) throws IOException {

		// 第一步，创建一个webbook，对应一个Excel文件
		HSSFWorkbook wb = new HSSFWorkbook();
		// 第二步，在webbook中添加一个sheet,对应Excel文件中的sheet
		HSSFSheet sheet = wb.createSheet("订单信息");
		// 第三步，在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制short
		HSSFRow row = sheet.createRow(0);
		// 第四步，创建单元格，并设置值表头 设置表头居中
		HSSFCellStyle style = wb.createCellStyle();
		style.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 创建一个居中格式
		HSSFCellStyle style2 = wb.createCellStyle();
		style2.setAlignment(HSSFCellStyle.ALIGN_RIGHT);// 创建一个居右格式
		HSSFCell cell = row.createCell(0);
		cell.setCellValue("游戏账号");
		cell.setCellStyle(style);
		cell = row.createCell(1);
		cell.setCellValue("商品名称");
		cell.setCellStyle(style);
		cell = row.createCell(2);
		cell.setCellValue("订单生成时间");
		cell.setCellStyle(style);
		cell = row.createCell(3);
		cell.setCellValue("订单号");
		cell.setCellStyle(style);
		cell = row.createCell(4);
		cell.setCellValue("上游订单号");
		cell.setCellStyle(style);
		cell = row.createCell(5);
		cell.setCellValue("下游订单号");
		cell.setCellStyle(style);
		cell = row.createCell(6);
		cell.setCellValue("支付单号");
		cell.setCellStyle(style);
		cell = row.createCell(7);
		cell.setCellValue("商品面值");
		cell.setCellStyle(style);
		cell = row.createCell(8);
		cell.setCellValue("购买数量");
		cell.setCellStyle(style);
		cell = row.createCell(9);
		cell.setCellValue("上游退款金额(元)");
		cell.setCellStyle(style);
		cell = row.createCell(10);
		cell.setCellValue("下游付款金额(元)");
		cell.setCellStyle(style);
		cell = row.createCell(11);
		cell.setCellValue("成本总金额(元)");
		cell.setCellStyle(style);
		if (StringUtils.isNotBlank(supplierName)) {
			cell = row.createCell(12);
			cell.setCellValue("供应商编号");
			cell.setCellStyle(style);
			cell = row.createCell(13);
			cell.setCellValue("供应商名称");
			cell.setCellStyle(style);
		}
		cell = row.createCell(14);
		cell.setCellValue("工号");
		cell.setCellStyle(style);

		// 第五步，写入实体数据 实际应用中这些数据从数据库得到，
		double total = 0D;
		double totalRePrice = 0D;
		int buyNumTotal = 0;
		int parvalueTotal = 0;
		double goodsCostTotal = 0D;
		if (list != null && !list.isEmpty()) {
			for (int i = 0; i < list.size(); i++) {
				row = sheet.createRow((int) i + 1);
				OrderInfo order = (OrderInfo) list.get(i);
				// 第四步，创建单元格，并设置值

				cell = row.createCell(0);
				cell.setCellStyle(style);
				cell.setCellValue(order.getGameAccount());
				cell = row.createCell(1);
				cell.setCellStyle(style);
				cell.setCellValue(order.getGoodsName());
				cell = row.createCell(2);
				cell.setCellStyle(style);
				cell.setCellValue(order.getCreateOrderTime());
				cell = row.createCell(3);
				cell.setCellStyle(style);
				cell.setCellValue(order.getOrderId());
				cell = row.createCell(4);
				cell.setCellStyle(style);
				cell.setCellValue(order.getSupOrderId());
				cell = row.createCell(5);
				cell.setCellStyle(style);
				cell.setCellValue(order.getMerchantOrderId());
				cell = row.createCell(6);
				cell.setCellStyle(style);
				cell.setCellValue(order.getPaymentOrderNo());
				cell = row.createCell(7);
				cell.setCellStyle(style);
				int goodsValue = order.getGoodsValue() / 1000;
				parvalueTotal += goodsValue;
				cell.setCellValue(goodsValue);
				cell = row.createCell(8);
				int bn = order.getBuyNum();
				buyNumTotal += bn;
				cell.setCellStyle(style);
				cell.setCellValue(bn);
				double rePrice = order.getRePrice() * 1.0 / 1000;
				totalRePrice += rePrice;
				cell = row.createCell(9);
				cell.setCellStyle(style);
				cell.setCellValue(rePrice);
				double totalPrice = order.getTotalPrice() * 1.0 / 1000;
				total += totalPrice;
				cell = row.createCell(10);
				cell.setCellStyle(style);
				cell.setCellValue(totalPrice);
				double costPrice = order.getGoodsCostPrice()
						* order.getBuyNum() * 1.0 / 1000;
				goodsCostTotal += costPrice;
				cell = row.createCell(11);
				cell.setCellStyle(style);
				cell.setCellValue(costPrice);
				if (StringUtils.isNotBlank(supplierName)) {
					cell = row.createCell(12);
					cell.setCellStyle(style);
					cell.setCellValue(order.getSupplyId());
					cell = row.createCell(13);
					cell.setCellStyle(style);
					cell.setCellValue(order.getSupplyName());
				}
				cell = row.createCell(14);
				cell.setCellStyle(style);
				cell.setCellValue(order.getRegisterAccount());
			}
			DecimalFormat df = new DecimalFormat("#.000");
			row = sheet.createRow(list.size() + 1);

			cell = row.createCell(7);
			cell.setCellStyle(style2);
			cell.setCellValue("商品面值总计: " + parvalueTotal);

			cell = row.createCell(8);
			cell.setCellStyle(style2);
			cell.setCellValue("购买数量总计: " + buyNumTotal);

			cell = row.createCell(9);
			cell.setCellStyle(style2);
			if (totalRePrice == 0) {
				cell.setCellValue("上游退款总计: " + "0.000");
			} else {
				cell.setCellValue("上游退款总计: " + df.format(totalRePrice));
			}
			cell = row.createCell(10);
			cell.setCellStyle(style2);
			cell.setCellValue("下游付款总计: " + df.format(total));

			cell = row.createCell(11);
			cell.setCellStyle(style2);
			cell.setCellValue("成本价总计: " + df.format(goodsCostTotal));
		}

		// 第六步，将文件存到指定位置
		fileName = new String(filenameWeb.getBytes("GBK"), "iso8859-1");
		// FileOutputStream fout = new FileOutputStream(path);
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		wb.write(baos);
		istream = new ByteArrayInputStream(baos.toByteArray());
		baos.close();
		// fout.flush();
		// fout.close();
	}

	public OrderInfoService getOrderInfoService() {
		return orderInfoService;
	}

	public void setOrderInfoService(OrderInfoService orderInfoService) {
		this.orderInfoService = orderInfoService;
	}

	public OrderInfoQuery getOrderInfoQuery() {
		return orderInfoQuery;
	}

	public void setOrderInfoQuery(OrderInfoQuery orderInfoQuery) {
		this.orderInfoQuery = orderInfoQuery;
	}

	public Pagination<OrderInfo> getPage() {
		return page;
	}

	public void setPage(Pagination<OrderInfo> page) {
		this.page = page;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getPaymentOrderNo() {
		return paymentOrderNo;
	}

	public void setPaymentOrderNo(String paymentOrderNo) {
		this.paymentOrderNo = paymentOrderNo;
	}

	public String getMerchantIP() {
		return merchantIP;
	}

	public void setMerchantIP(String merchantIP) {
		this.merchantIP = merchantIP;
	}

	public String getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(String totalPrice) {
		this.totalPrice = totalPrice;
	}

	public OrderInfo getOrderInfo() {
		return orderInfo;
	}

	public void setOrderInfo(OrderInfo orderInfo) {
		this.orderInfo = orderInfo;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getOrdId() {
		return ordId;
	}

	public void setOrdId(String ordId) {
		this.ordId = ordId;
	}

	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	public List<String> getSupplyNameList() {
		return supplyNameList;
	}

	public void setSupplyNameList(List<String> supplyNameList) {
		this.supplyNameList = supplyNameList;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public InputStream getIstream() {
		return istream;
	}

	public void setIstream(InputStream istream) {
		this.istream = istream;
	}

	public String getCreateOrderTimeStart() {
		return createOrderTimeStart;
	}

	public void setCreateOrderTimeStart(String createOrderTimeStart) {
		this.createOrderTimeStart = createOrderTimeStart;
	}

	public String getCreateOrderTimeEnd() {
		return createOrderTimeEnd;
	}

	public void setCreateOrderTimeEnd(String createOrderTimeEnd) {
		this.createOrderTimeEnd = createOrderTimeEnd;
	}

	public String getIsPay() {
		return isPay;
	}

	public void setIsPay(String isPay) {
		this.isPay = isPay;
	}

	public List<DownstreamUserInfo> getDownUserList() {
		return downUserList;
	}

	public void setDownUserList(List<DownstreamUserInfo> downUserList) {
		this.downUserList = downUserList;
	}

	public String getDownUserNo() {
		return downUserNo;
	}

	public void setDownUserNo(String downUserNo) {
		this.downUserNo = downUserNo;
	}

	public String getMerchantOrderId() {
		return merchantOrderId;
	}

	public void setMerchantOrderId(String merchantOrderId) {
		this.merchantOrderId = merchantOrderId;
	}

	public String getGameAccount2() {
		return gameAccount2;
	}

	public void setGameAccount2(String gameAccount2) {
		this.gameAccount2 = gameAccount2;
	}

	public String getRegisterAccount() {
		return registerAccount;
	}

	public void setRegisterAccount(String registerAccount) {
		this.registerAccount = registerAccount;
	}

	public List<OrderInfo> getAccountList() {
		return accountList;
	}

	public void setAccountList(List<OrderInfo> accountList) {
		this.accountList = accountList;
	}

}
